package com.example.smartcity_poverty.ui.AllService.OA.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MenuItem
import com.example.smartcity_poverty.R
import com.example.smartcity_poverty.logic.util.Util.show
import kotlinx.android.synthetic.main.activity_oa_show_me_true.*

/**
 * 预约成功页面
 */
class OaShowMeTrueActivity : AppCompatActivity() {

    private val time by lazy { intent.getStringExtra("time") }
    private val class1 by lazy { intent.getStringExtra("class1") }
    private val class2 by lazy { intent.getStringExtra("class2") }


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
        setContentView(R.layout.activity_oa_show_me_true)
        title = "预约信息"

        time?.let { oaShowMeAoData1.text = "预约时间: $it" }
        class1?.let { oaShowMeAoData2.text = "预约科室: $it" }
        class2?.let { oaShowMeAoData3.text = "门诊类型: $it" }

        oaShowMeAoDataOk.setOnClickListener {
            finish()
        }
    }

    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        finish()
        return super.onOptionsItemSelected(item)
    }
}